/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.web.entity.WxGoods;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.sql.Timestamp;
import java.util.List;

/**
 * 奖品管理MAPPER接口
 * @author rongjie
 * @version 2017-09-04
 */
@MyBatisMapper
public interface WxGoodsMapper extends BaseMapper<WxGoods> {
    @Select("select count(1) from wx_goods_time where  user_id=#{userId}and time BETWEEN #{time} and #{endTime}")
    int getIntegrationTime(@Param("time") Timestamp time, @Param("endTime") Timestamp endTime,
                           @Param("userId") String userId);
    @Select("select id from wx_goods  ")

    List<String> getIdList();

    int setGoods(WxGoods wxGoods);

    int setRate(WxGoods wxGoods);

    int addTime(String id);

    List<WxGoods> getWxGoodsRate(String money);
}